<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$dsDeallAll = DealFlight::getDealRight();
?>
<div class="col-md-3">
    <div class="title-right">
        <h4>Travel Deals</h4>
    </div>

    <div class="list-right">
        <?php
        foreach ($dsDeallAll as $rows) {
            $type_travel = $rows->type_travel;
	    $aImages = unserialize($rows->image);
            if ($type_travel == DealFlight::DEAL) {
                $url_detail = get_site_url() . '/detail-deal?i=' . $rows->deal_flight_id;
            } else {
                $url_detail = get_site_url() . '/flight-detail?i=' . $rows->deal_flight_id;
            }
            ?>
            <li>
		<?php foreach($aImages as $img){?>
                <img src="<?php echo TIMTHUMB_URL ?>?src=<?php echo DEAL_URL . $img ?>&w=65&h=59">
		<?php break;
		}?>
                <a href="<?php echo $url_detail; ?>">Flights: <?php echo $rows->name ?> </a>
                <div class="line-foprice">
                    <p>Flights</p>
                    <p class="price">from £ <span><?php echo number_format($rows->price); ?></span></p>
                </div>
            </li>

            <?php
        }
        ?>


    </div>
    <div class="title-right">
        <h4>Current Vouchers</h4>
    </div>
    <ul class="list-voucher">
        <li>Accommodation: General List of Codes and Promos</li>
        <li>Accommodation: General List of Codes and Promos</li>
    </ul>

    <div class="ads">
        <img src="<?php echo get_template_directory_uri() ?>/images/ads.png">
    </div>

</div>